#include "host.h"

/*
Host::Host(Ogre::String n, CPU *c[], int ncpus, Memory *m, Disk *d[], int ndisks, Interface *interf[], int ninterfaces){
       name=n;
       int i;
       Host::ncpus=ncpus;
       for(i=0; i<ncpus;i++)
               cpus[i] = c[i];
       mem=m;
       Host::ndisks=ndisks;
       for(i=0; i<ncpus;i++)
               disks[i]=d[i];
       Host::ninterfaces=ninterfaces;
       for(i=0; i<ncpus;i++)
               interfaces[i]=interf[i];
}
*/

Host::Host(Ogre::String n){
       name=n;
}
void Host::addCPU(CPU *c){
	cpu_list.push_back(*c);
}

void Host::addDisk(Disk *d){
	disk_list.push_back(*d);
}

void Host::addIf(Interface *i){
	interface_list.push_back(*i);
}

void Host::setMem(Memory *m){
	mem=m;
}


Host::~Host(){
	/*
       int i;
       for (i = 0; i < MAX_DISK; i++) {
               if (disks[i] != NULL)
                       delete disks[i];
       }
       for (i = 0; i < MAX_IF; i++) {
               if (interfaces[i] != NULL)
                       delete interfaces[i];
       }
       for (i = 0; i < MAX_CPU; i++) {
               if (cpus[i] != NULL)
                       delete cpus[i];
       }
	   */
}
